=== Heartbeat Manager ===
Contributors: Nicola Loglisci
Donate link: https://www.paypal.com/donate?hosted_button_id=YOUR_BUTTON_ID
Tags: heartbeat, performance, optimization, cpu, admin, frontend, ajax
Requires at least: 5.0
Tested up to: 6.9.4
Requires PHP: 7.0
Stable tag: 1.1
License: GPLv2 or later

Advanced control over the WordPress Heartbeat API frequency. Optimize server performance by changing or disabling the polling interval in both the backend and frontend.

== Description ==

Heartbeat Manager allows you to optimize your WordPress site's performance by limiting or completely disabling the Heartbeat API calls.

The WordPress Heartbeat API uses AJAX calls (`admin-ajax.php`) to provide real-time information, such as when other users are editing a post or to show real-time notifications (like in WooCommerce). While useful, on many sites, especially E-commerce stores with high traffic, these frequent calls can put a significant strain on the server's CPU.

This plugin allows you to granularly control this behavior via a simple settings card in **Settings > Heartbeat Manager**.

**Key Features:**

*   **Backend Frequency Control:** Increase the interval of the "beat" while inside the WordPress Admin Dashboard. Setting a higher value (e.g., 60 or 120 seconds) reduces unnecessary server load while editing content.
*   **Frontend Management:** Choose whether to keep Heartbeat active on the public site or disable it completely. Disabling it on the frontend is highly recommended for E-commerce sites to ensure a smoother browsing experience for customers.
*   **Clean Implementation:** The plugin handles disabling and changing intervals in a way that minimizes conflicts with other plugins that might rely on Heartbeat.
*   **Translation Ready:** Fully internationalized and ready for translation.

Developed by Nicola Loglisci (Level Network) to maximize site fluidity.

== Installation ==

1. Upload the `heartbeat-manager` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **Settings > Heartbeat Manager** to configure the values.

== Changelog ==

= 1.1 =
* Enhancement: Fully internationalized (i18n ready) with default language set to English.
* Fix: Greatly improved logic for handling frontend heartbeat intervals (disabling via inline script, changing frequency via standardized localization).
* Fix: Added missing escaping (`esc_attr`, `esc_html`) and proper sanitization (`intval`) for better security.
* Feature: Added "Settings" and "Donate" links directly beneath the plugin name in the plugins list.
* Dev: Cleaned up CSS to avoid class name conflicts with WordPress core.

= 1.0 =
* Initial release. Granular heartbeat control and dedicated UI.

== Upgrade Notice ==

= 1.1 =
This version includes critical security fixes, improved frontend logic, and full translation readiness. Highly recommended upgrade.

== Donations ==

If you find Heartbeat Manager useful and want to support its continued development, please consider making a <a href="https://www.paypal.com/donate?hosted_button_id=YOUR_BUTTON_ID" target="_blank">donation via PayPal</a>. Your support is greatly appreciated!